<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of calles_model
 *
 * @author marcelo.diaz
 */
class Calles_Model extends Model{
    function Calles_Model(){
      parent::Model();
    }

    function get_street($street){
      $streets = file_get_contents(base_url().'streets.xml');
      $xml = new SimpleXMLElement($streets);
      $marker;

      foreach($xml->marker as $hijo){
          if ($hijo['name'] == $street){
              $marker = $hijo;
              break;
          }
      }
      //mail("conocepunta@gmail.com", "[acces-debug]", $marker->asXML());
      header('Content-Type:text/xml');
      echo $marker->asXML();
    }
}
?>
